package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 页面访问记录对象 page_visit
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
public class PageVisit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 页面ID */
    @Excel(name = "页面ID")
    private Long pageId;

    /** 访问时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date visitTime;

    /** 访问IP */
    @Excel(name = "访问IP")
    private String visitIp;

    /** 访问设备 */
    @Excel(name = "访问设备")
    private String visitDevice;

    /** 访问浏览器 */
    @Excel(name = "访问浏览器")
    private String visitBrowser;

    /** 操作系统 */
    @Excel(name = "操作系统")
    private String visitOs;

    /** 访问来源 */
    @Excel(name = "访问来源")
    private String visitSource;

    /** 访问URL */
    @Excel(name = "访问URL")
    private String visitUrl;

    /** 访问时长（秒） */
    @Excel(name = "访问时长", readConverterExp = "秒=")
    private Long visitDuration;
    
    /** 访客标识 */
    @Excel(name = "访客标识")
    private String visitorId;
    
    /** 是否唯一访客（0否 1是） */
    @Excel(name = "是否唯一访客", readConverterExp = "0=否,1=是")
    private String isUnique;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setPageId(Long pageId) 
    {
        this.pageId = pageId;
    }

    public Long getPageId() 
    {
        return pageId;
    }

    public void setVisitTime(Date visitTime) 
    {
        this.visitTime = visitTime;
    }

    public Date getVisitTime() 
    {
        return visitTime;
    }

    public void setVisitIp(String visitIp) 
    {
        this.visitIp = visitIp;
    }

    public String getVisitIp() 
    {
        return visitIp;
    }

    public void setVisitDevice(String visitDevice) 
    {
        this.visitDevice = visitDevice;
    }

    public String getVisitDevice() 
    {
        return visitDevice;
    }

    public void setVisitBrowser(String visitBrowser) 
    {
        this.visitBrowser = visitBrowser;
    }

    public String getVisitBrowser() 
    {
        return visitBrowser;
    }

    public void setVisitOs(String visitOs) 
    {
        this.visitOs = visitOs;
    }

    public String getVisitOs() 
    {
        return visitOs;
    }

    public void setVisitSource(String visitSource) 
    {
        this.visitSource = visitSource;
    }

    public String getVisitSource() 
    {
        return visitSource;
    }

    public void setVisitUrl(String visitUrl) 
    {
        this.visitUrl = visitUrl;
    }

    public String getVisitUrl() 
    {
        return visitUrl;
    }

    public void setVisitDuration(Long visitDuration) 
    {
        this.visitDuration = visitDuration;
    }

    public Long getVisitDuration() 
    {
        return visitDuration;
    }
    
    public void setVisitorId(String visitorId) 
    {
        this.visitorId = visitorId;
    }

    public String getVisitorId() 
    {
        return visitorId;
    }
    
    public void setIsUnique(String isUnique) 
    {
        this.isUnique = isUnique;
    }

    public String getIsUnique() 
    {
        return isUnique;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pageId", getPageId())
            .append("visitTime", getVisitTime())
            .append("visitIp", getVisitIp())
            .append("visitDevice", getVisitDevice())
            .append("visitBrowser", getVisitBrowser())
            .append("visitOs", getVisitOs())
            .append("visitSource", getVisitSource())
            .append("visitUrl", getVisitUrl())
            .append("visitDuration", getVisitDuration())
            .append("visitorId", getVisitorId())
            .append("isUnique", getIsUnique())
            .append("createTime", getCreateTime())
            .toString();
    }
}
